home *** CD-ROM | disk | FTP | other *** search
/ Amiga Packmags / NewsFlash - Issue 07 (1990-01)(UGA - 17-Bit Software)(Disk 1 of 2)[a intro].zip / NewsFlash - Issue 07 (1990-01)(UGA - 17-Bit Software)(Disk 1 of 2)[a intro].adf / prog / view.doc < prev    next >
Text File  |  1996-12-24  |  13KB  |  305 lines

  1.  
  2.  
  3.  
  4.                                      View80
  5.                                    ----------
  6.  
  7.                                      v1.11
  8.  
  9.  
  10.                               by Federico Giannici
  11.  
  12.  
  13.  
  14. UGA NOTE: This program was sent in for Newsflash/UGA competitions and therefor
  15.           for exclusive use in the UGA serie/Newsflash. We like to thank 
  16.           Federico for his sending and this shows that there are in Italy
  17.           good Amiga coders too. He makes a good chance to win a price in our
  18.           wintercompetitions. If you have made a great utility too don't
  19.           hesitate to get in touch with us, we make our disks for YOU!!!
  20.  
  21. View80 is a fast and comfortable ASCII files reading program. It allows you 
  22. to  visualize 80 columns  texts and to  use the scrollbar at same time.
  23.  
  24. View80 is entirely written  in C language, except  for a little routine for 
  25. the screen writing,  that,  from  the  version  1.1, has been rewritten in 
  26. assembly
  27. language in order to obtain the maximum speed. So, 3 different scroll-modes  are
  28. available:  SMOOTH-Scroll with gradual appearing of the lines, FAST-Scroll rapid
  29. but fluent, and TURBO-Scroll that gives  you the fastest speed, obtained by  not
  30. refreshing the scroll-bar which is positioned only when you release the keys.
  31.  
  32. View80  gives you the best  when there is some  FAST-RAM available. It is due to
  33. the fact that it's  a multiprocessor program (in  Amiga almost every program  is
  34. multiprocessor), in fact, while the Blitter is scrolling the screen, AT THE SAME
  35. TIME,  the CPU (680x0)  is writing the  next line in  a temporary buffer. So, if
  36. View80 is forced  to work in  CHIP-RAM, the CPU  and the Blitter  will come into
  37. conflict  for accessing the memory. This causes, with long lines, a slowing down
  38. of the Fast and Turbo scroll. No problems with the Smooth-Scroll.
  39.  
  40. Another peculiarity of View80, from the  version 1.1, is the ability of  loading
  41. up to three files in memory, and to switch among them by simply pressing a key.
  42.  
  43. View80  is a Public Domain  program and you can  copy and utilize it freely. You
  44. don't have to pay to me  anything (every monetary contributions however will  be
  45. well  accepted) but you can't  modify, sell or incorporate  it in any commercial
  46. program without my  written authorization. Again,  I am not  responsible for any
  47. damage, direct or indirect, derived by the utilization of View80.
  48.  
  49. And now, formalities off, let's start with the program description.
  50.  
  51.  
  52.  
  53.  
  54.  
  55.                                     LOADING
  56.                                    ---------
  57.  
  58.  
  59. You can run View80 both from CLI or Workbench.
  60.  
  61. Files can be automatically loaded in the usual way:
  62.  
  63. From  CLI, typing View80  followed by the  filenames (up to  three). The CLI can
  64. immediately be used, as if the "Run" command has been used to load the program.
  65.  
  66. From Workbench, using  the multiple selection  procedure with the  SHIFT key, or
  67. typing  "View80"  into  the  Default  Tool  of  the  file to be loaded, and then
  68. double-clicking it. You surely know what and where the Default Tool is (it is in
  69. the INFO window that is activated by the first menu of the Workbench, under  the
  70. "Info" label, do you remember?).
  71.  
  72. If   no  file  is   supplied,  the  program   will  automatically  activate  the
  73. File-Requester (File-Finder by FG, of course!). We'll examine it later on.
  74.  
  75. View80 automatically recognizes if it has been loaded on a PAL or NTSC Amiga and
  76. adapts its  screen dimension.  I haven't  actually tested  my program  on a NTSC
  77. machine but I think there should not be any problem.
  78.  
  79.  
  80.  
  81.  
  82.  
  83.                                      MOVING
  84.                                     --------
  85.  
  86.  
  87. You can move up and down trough the textfile both by keyboard or mouse.
  88.  
  89.  
  90. KEYBOARD MOVEMENTS
  91. By using the UP - DOWN arrow keys you can scroll the text in SMOOTH-Scroll.
  92. If  you press them with  the SHIFT key you  obtain the FAST-Scroll, and pressing
  93. the ALT key you obtain the TURBO-Scroll.
  94. By using the LEFT - RIGHT arrow keys you can move through the text, page by page
  95. (the last line of the previous page will  be showed at the top of the screen  in
  96. order  not to loose the thread of what  you was reading). If you press the SHIFT
  97. key the movement will be carried out in FAST-Scroll.
  98. By using the ALT key with the LEFT - RIGHT arrow keys you can jump to the top or
  99. to the bottom of the text.
  100. The SPACE bar will activate/deactivate the automatic scroll. Again, you can  use
  101. the SHIFT or ALT keys to speed up the scroll.
  102. With  the F4  and F5  keys you  can jump  to a  mark that  was previously set by
  103. pressing the  SHIFT and  F4 or  F5. When  a new  file is  loaded, F4  and F5 are
  104. initialized  to the first and last line of  the file. So, initially, they are an
  105. easy substitute for the ALT and LEFT - RIGHT keys.
  106.  
  107.  
  108. MOUSE MOVEMENTS
  109. By using the mouse you can operate on the scrollbar and on the arrow gadgets  (a
  110. double-click  activate the FAST-Scroll).  Besides, you can  enable the scroll by
  111. clicking with the mouse in the top  or the bottom halves of the screen  (if this
  112. is done just near the borders the scroll will turn to the FAST-Scroll).
  113. The TURBO-Scroll isn't available with the mouse, because for long movements it's
  114. more convenient to use the scroll-bar.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                                      MENUS
  121.                                     -------
  122.  
  123.  
  124. LOAD FILE
  125. (Obtained also with F9 or F10)
  126. This  option allows you to load a new  file in memory replacing the previous one
  127. (you can obtain this also by pressing F9). To Load a new file without delete the
  128. previous one you can either move to another File# (see later...) and then choose
  129. the LOAD FILE option or, better, press the F10 key which automatically will find
  130. a free File# (if the current isn't).
  131. The File-Finder window will appear as  you select this option (File-Finder is  a
  132. File-Requester  I had created some time ago) and the current directory filenames
  133. will be displayed.
  134. File-Finder works like  many other file-requester  so I will  tell you only  its
  135. peculiarity.
  136. The  "Suffix" gadget allows  you to select  only those files  which end with the
  137. suffix you  chose (obviously,  if no  suffix is  chosen every  filename will  be
  138. displayed).
  139. If  you let File-Finder complete  the last directory reading,  the next time you
  140. recall it, the current directory list will be immediately displayed.
  141. Again, since it's difficult to select  by mouse one of the filenames  during the
  142. directory   reading  (the  filenames  scroll  down   as  they  are  arranged  in
  143. alphabetical order),  File-Finder stops  reading as  you click  in the filenames
  144. window in order to let you select, among the filenames read until now, which one
  145. you want to load.
  146.  
  147.  
  148. QUIT
  149. (Obtained also with ESC)
  150. It leaves the program clearing all the files in memory.
  151. It will appear a requester asking you to confirm your intentions. You can answer
  152. positively by pressing any key but the function and arrow ones.
  153.  
  154.  
  155. SEARCH STRING
  156. This  option allows you to search a string in the file with no care for upper or
  157. lower case.
  158. The search starts from the second  displayed line on the screen downward  (we'll
  159. see why later).
  160. If  the search is successful the line  containing the string is displayed on the
  161. screen in Reverse Mode.
  162.  
  163.  
  164. SEARCH NEXT
  165. Like  "SEARCH  STRING",  but  without  request  for the string to search. Since,
  166. usually,  the last  line founded  is displayed  on the  top of the screen (first
  167. line), and  the search  starts from  the second  screen line,  the result is the
  168. usual "SEARCH NEXT" function. (Q.E.D.)
  169.  
  170.  
  171. PRINT RANGE
  172. This option allows you to print a selected range of lines.
  173. You  will be  asked for  the number  of the  first and  the last  line to print.
  174. Usually  these  lines  will  be  previously  chosen  positioning  the screen and
  175. pressing  the F6 and F7  keys respectively. By default  the F6 and F7 values are
  176. assigned to the first and last line of the file.
  177. View80 makes a 80 columns print  (with no care for the Preferences  settings) so
  178. to  reproduce exactly  what is  on the  screen, expanding  the Tabs properly and
  179. replacing the unprintable characters with the "X" character. (see TABS)
  180. Commonly the print  will be sent  to the "PRT:"  device (the printer),  but it's
  181. possible  to redirect the output to any file you choose by the "Send to" gadget.
  182. If the file already exists the output  will be appended to the end of  the file.
  183. So,  it's possible to make a collage  of several pieces of different files. It's
  184. recommended, for speed problems, to make this operations in RAM:.
  185. The printing can be aborted at any time by clicking on the CANCEL gadget.
  186.  
  187.  
  188. PRINT LINE
  189. When this option is selected the first line on the top of the screen is printed,
  190. and automatically the whole text is scrolled up of a line.
  191. It  is  useful  for  printing  a  small  amount of lines avoiding the line range
  192. requester.
  193. You  pay this advantage in terms of speed,  because, for each line View80 has to
  194. open and to close the "PRT:" (or other) device and this operation requires a lot
  195. of time.
  196.  
  197.  
  198. USE MY COLORS
  199. By default, View80 uses the Workbench colors.
  200. If they result no good for reading or simply you don't like them, you can choose
  201. another  pre-defined  set  of  colors  (nearly  the  default  of Preferences) by
  202. selecting this option.
  203.  
  204.  
  205. JUMP TO
  206. A requester will appear asking you the line number to which to jump. If the line
  207. isn't  accessible as the first of the screen,  the line you chose will appear in
  208. reverse (try to jump to a pair of line before the end of file).
  209.  
  210.  
  211. CLEAR FILE
  212. Clears the file corresponding  to the current File#.  The other files in  memory
  213. will not be affected.
  214.  
  215.  
  216. ABOUT KEYS
  217. (Obtained also with the HELP key)
  218. By  selecting this option, View80 will show an  help window with the list of the
  219. keys (and their functions) you can make use of in the program.
  220. It is also showed the total amount of free memory.
  221. You can get rid of this window by pressing any key.
  222.  
  223.  
  224. FILE# (1, 2, 3)
  225. (Obtained also with F1, F2 and F3)
  226. This command let you switch from a file to another in memory.
  227. Note that everytime  you come back  to a File#  you will find  it EXACTLY as you
  228. left  it. In particular  it will be  memorized: the current  position, the marks
  229. (F4, F5), the print line numbers (F6, F7), the Word-Wrap and the Tab.
  230.  
  231.  
  232. WORD-WRAP (OFF, ON)
  233. When this function is  active (ON) View80 doesn't  split the word at  the end of
  234. the line, but puts it into the following line.
  235.  
  236.  
  237. TAB (OFF, 1, 2, 4, 8)
  238. This option allows you to select the way the Tabs will be displayed.
  239. If  you select "OFF", View80 will consider  the Tabs like the others unprintable
  240. characters (it will display them in  a single vertical "09" character) (look  at
  241. the next topic: MISCELLANEA).
  242. If  you select one  of the other  numbers (1, 2,  4, 8) View80  will display the
  243. right number of spaces in order to adequately tabulate the text.
  244.  
  245. Note  that  each  time  you  either  change  from  one TAB setting to another or
  246. activate/deactivate  the Word-Wrap,  View80 has  to reformat  the whole text and
  247. this requires  some time.  Besides, the  values of  F4, F5,  F6 and  F7 will  be
  248. brought back to the default (first and last line of the file).
  249.  
  250.  
  251.  
  252.  
  253.  
  254.                                   MISCELLANEA
  255.                                  -------------
  256.  
  257.  
  258. If  the  scroll  is  obtained  by  the  keyboard, View80 makes the mouse pointer
  259. temporarily invisible. At  the first movement  of the mouse  View80 re-makes the
  260. pointer visible.
  261.  
  262. In  the drag-bar of  the screen the  following information are always displayed:
  263. the name of the program (View80);  the Version number; the number of  File#; the
  264. name  of the loaded File;   its dimension in bytes and  its length in lines; the
  265. number of the  current line, that  is the first  line on the  top of the  screen
  266. (View80 updates this number only when you release the mousebuttons or any key).
  267.  
  268. View80  makes use  of a  special set  of characters  which shows any unprintable
  269. character  contained  between  00  and  1F  and  between 80 and 9F with a single
  270. "vertical"  character showing the proper hexadecimal  value of the character (it
  271. seems difficult but it is not; try to load a non-text file and you will see).
  272. During the print these special characters are replaced with the "X" character.
  273.  
  274. Sometime a requester with some message for you can appear. You can get rid of it
  275. by clicking on the "Continue" gadget or simply pressing any key.
  276.  
  277. When View80  meets a  CR and  LF characters  sequence (Carriage  Return and Line
  278. Feed) it considers them as a single LF character.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.                                    FINAL NOTE
  285.                                   ------------
  286.  
  287.  
  288. For  any suggestion,  criticism, bug  reporting, contribution  and, most of all,
  289. praises you  can contact  me at  the address  shown on  the top  of the  menu of
  290. View80. You can also contact me on the Italian BBS Mc-Link (06-4180440), my code
  291. is MC4080.
  292.  
  293. I  enjoyed  very  much  programming  View80.  The  result  has  exceeded  all my
  294. expectations. I hope you like it, too.
  295.  
  296.  
  297.  
  298.  
  299.                                                        Federico Giannici
  300.  
  301.                                                        Viale Francia 4
  302.                                                        90146 Palermo
  303.                                                        Italy
  304.  
  305.